<template>
	<view>
		<view class="header">这是我们的头部公共组件</view>
		<view>{{title}}</view>
		<view>{{user}}</view>
		<view>
			<input type="text" placeholder="请输入内容" @input="oninput" />
		</view>
		
	</view>
</template>

<script>
	export default {
		name:"myheader",
		// props:["title"],
		props:{
			 title:{
				  type:String,
				  default:'王八店'
			 },
			user:{
				type:Array,
				default() {
					 return [1,2,3]
				}
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			 oninput(e) {
				  this.$emit("myenv",e.detail.value)
			 }
		}
	}
</script>

<style lang="scss">
   .header{ 
	   width: 200rpx;
	   height: 200rpx;
	   background-color: greenyellow;
   }
</style>